var express = require('express');
var router = express.Router();
var login = require('../controller/login.js')

/**
 * @api {post} /login 1.1 登录
 * @apiName login
 * @apiGroup Login
 *
 * @apiParam {String} usersname 必填
 * @apiParam {String} password 必填
 *
 * @apiSuccessExample {json} Success-Response:
{
    "status": 0,
    "msg": "恭喜您，登录成功！",
    "token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VybmFtZSI6ImZseSIsIl9pZCI6MSwiaWF0IjoxNTkyNzk2MDMxLCJleHAiOjE1OTI4ODI0MzF9.Yw7vO1kr5-MxkKD_h2k2JfM1rbMIXhoVBUSP06reISM",
    "data": {
        "id": 1,
        "age": 18,
        "ctime": "2020-06-22 09:34:54",
        "isdel": 0
    }
}
 */
router.post('/login', login)
module.exports = router